package com.itheima03.day15;

import java.io.IOException;
import java.net.*;

/**
 * @author 刘全
 * @date 2021/8/9
 */
public class Sender {
    public static void main(String[] args) throws IOException {
        DatagramSocket ds = new DatagramSocket();

        byte[] bytes = "丕儿淦你娘".getBytes();

        InetAddress address = InetAddress.getByName("192.168.101.2");
        int port = 10086;

        DatagramPacket dp = new DatagramPacket(bytes, bytes.length, address, port);

        ds.send(dp);
        ds.close();
    }
}
